package com.sundae.smarthomedemo.Utils;

import com.sundae.smarthomedemo.R;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by daijiyuan on 2017/6/7.
 * 邮箱 948820549@qq.com
 *
 * @Sundae
 */

public class Utils {

    public static String getModelString(int type)
    {
        if(type == 0) return "普通模式";
        if(type == 1) return "快速模式";
        if(type == 2) return "节电模式";
        if(type == 3) return "EOC模式";
        return "普通模式";
    }

    public static int getImgRes(int type)
    {
        if(type == 0) return R.drawable.little_rsq;
        if(type == 1) return R.drawable.gyg;
        if(type == 2) return R.drawable.csq;
        return R.drawable.little_rsq;
    }

    public static String getNowTime()
    {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(new Date());
    }
}
